<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/content/topic" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>

  <div class="page">
    <div class="page-hd">
      <h1>{$Think.lang.managetopic}</h1>
    </div>
    <div class="navbar">
      <ul class="nav">
        <li <eq name="topic_tab" value="cur">class="active"</eq>><a href="{:URL('admin/Content/topic')}">{$Think.lang.topic}</a>
        </li>
        <li <eq name="recommend_tab" value="cur">class="active"</eq>><a href="{:URL('admin/Content/topic','recommend=1')}">{$Think.lang.recomendtopic}</a>
        </li>
        <li <eq name="recycle_tab" value="cur">class="active"</eq>><a href="{:URL('admin/Content/topic','recycle=1')}">{$Think.lang.recycle}</a>
        </li>
      </ul>
    </div>
    <div class="filterbar">
      <form id="search"  action="{:URL('admin/Content/topic')}" method="post">
        <input id="recycle" class="input-text" name="recycle" type="hidden" value="{$recycle}">
        <input id="recommend" class="input-text" name="recommend" type="hidden" value="{$recommend}">
        <label for="">{$Think.lang.topic}ID</label>
        <input type="number" name="title" id="topic_id" value="{$topic_id}" class="input-text">
        <label for="">{$Think.lang.topicname}</label>
        <input type="text" name="title" id="topic_name" value="{$topic_name}" class="input-text">
        <button type="submit" class="btn-search" id="J_search" title="{$Think.lang.search}">
          <i class="icon-search"></i>
        </button>
      </form>
    </div>
    <div class="datas">
      <div class="datas-bd">
        <table class="table">
          <thead>
            <tr>
              <th style="width: 10px">
                <input type="checkbox" class="toggle-all" />
              </th>
              <th style="">{$Think.lang.topic}ID</th>
              <th style="">{$Think.lang.topicname}</th>
              <th style="">{$Think.lang.topicsummary}</th>
              <th style="">{$Think.lang.topicpicture}</th>
              <th style="">{$Think.lang.publishtime}</th>
              <th style="">{$Think.lang.publishnumber}</th>
              <th style="">{$Think.lang.operating}</th>
            </tr>
          </thead>
          <tbody>
            <volist id="vo" name="data">
              <tr data-id="{$vo.topic_id}">
                <td>
                  <input type="checkbox" class="toggle" />
                </td>
                <td>{$vo.topic_id}</td>
                <td>
                  <a href="{:URL('home/User/topics',array('k'=>$vo['name']))}" target="_blank">
                    <eq name="vo.recommend" value="1">
                      <font color="red">[推荐]</font>
                    </eq>{$vo.name}</a>
                </td>
                <td>{$vo.des}</td>
                <td>
                  <neq name="vo.pic" value="">
                    <img showbigimage="true" style="max-height: 80px;max-width: 120px" class="maxHeight" src="{$vo['pic']}">
                  </neq>
                </td>
                <td>{$vo.ctime|date="Y-m-d H:i",###}</td>
                <td>{$vo.count}</td>
                <td>
                  <eq name="recycle_tab" value="cur">
                    <a href="javascript:;" class="A_restore" onclick="deleteTopic(0,'{$vo.topic_id}')">{$Think.lang.recover}</a>
                    <else/>
                    <a href="{:URL('admin/Content/addtopic',array('topic_id'=>$vo['topic_id']))}">{$Think.lang.editor}</a> |
                    <a href="javascript:;" class="A_screen" onclick="deleteTopic(1,'{$vo.topic_id}')">{$Think.lang.batchremove}</a>
                  </eq>
                </td>
              </tr>
            </volist>
          </tbody>
        </table>
      </div>
    </div>

    <div class="datas-ft">
      <div class="actions">
        <a href="{:URL('admin/Content/addtopic')}" class="btn">{$Think.lang.addtopic}</a>
        <eq name="recycle_tab" value="cur">
          <a href="#" class="btn" id="J_restore">{$Think.lang.recover}</a>
          <a href="#" class="btn" id="J_del">{$Think.lang.completelyremove}</a>
          <else/>
          <a href="#" class="btn" id="J_screen">{$Think.lang.batchshield}</a>
        </eq>
      </div>
      <div class="pager" style="text-align: right">{$page}</div>
    </div>

  </div>
  </div>
</body>

</html>
